package com.wdzl.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;

import com.wdzl.db.DBManager;

public class SchoolDao extends DBManager{
	/**
	 * 查询所有学校名称
	 * @return
	 */
	public Vector<String> querySchool(){
		String sql = "select scid,scname,scaddress from school";
		Vector<String> v = new Vector<String>();
		ResultSet rst = super.query(sql, null);
		try {
			while(rst.next()){
				String scname = rst.getString("scname");
				v.add(scname);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			super.close();
		}

		return v;
	}
}

